﻿using System;

namespace EIP.Common.Log
{
    /// <summary>
    /// 日志记录
    /// </summary>
    public class LogWriter
    {
        /// <summary>
        /// 写入调试日志
        /// </summary>
        /// <param name="message">日志内容</param>
        /// gxx,2015-12-11
        public static void Debug(string message)
        {
            try
            {
                NLog.Logger logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
                logger.Debug(message);
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("日志记录失败:{0}", ex));
            }
        }
    }
}